package com.jia;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

/**
 * User: xyjia
 * Date: 11/15/13
 * Time: 3:59 PM
 */
public class FrameLayoutActivity extends Activity {
    private ImageView one = null;
    private ImageView two = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.framelayout);
        one = (ImageView) findViewById(R.id.oneImgView);
        two = (ImageView) findViewById(R.id.twoImgView);
        one.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                two.setVisibility(View.VISIBLE);
                view.setVisibility(View.GONE);
            }
        });
        two.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                one.setVisibility(View.VISIBLE);
                view.setVisibility(View.GONE);
            }
        });
    }
}
